package com.matt.foundation.constant;

import lombok.Setter;

public class ContractFreezeConstant {

    //冻结记录状态
    public enum Status {
    	NORMAL(0, "进行中"),
        COMPLETED(1, "已完成");


        @Setter
        private int code;

        @Setter
        private String value;

        Status(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Status get(int code){
            for (Status status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }
    }
}
